<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CF CMS Administrator</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="../resources/js/ext/ext-{$ext_version}/resources/css/ext-all-notheme.css" rel="stylesheet" type="text/css" />
<link href="../resources/js/ext/ext-{$ext_version}/resources/css/yourtheme.css" rel="stylesheet" type="text/css" />
<!--<script type="text/javascript" src="../resources/js/ext/ext-{$ext_version}/adapter/ext/ext-base.js" ></script>
<script type="text/javascript" src="../resources/js/ext/ext-{$ext_version}/ext-all.js"></script>-->
<script type="text/javascript" src="http://www.sencha.com/deploy/dev/adapter/ext/ext-base.js" ></script>
<script type="text/javascript" src="http://www.sencha.com/deploy/dev/ext-all.js"></script>

<script type="text/javascript" src="../resources/js/ext/ext-{$ext_version}/ux/Ext.ux.grid.CheckboxColumn.js"></script>

<script type="text/javascript" src="js/core/prototype.js"></script>
<script type="text/javascript" src="js/core/App.js"></script>
<script type="text/javascript" src="js/core/Config.js"></script>
<script type="text/javascript" src="js/core/WindowManager.js"></script>
<script type="text/javascript" src="js/core/StartMenu.js"></script>
<script type="text/javascript" src="js/core/StartButton.js"></script>
<script type="text/javascript" src="js/core/Taskbar.js"></script>
<script type="text/javascript" src="js/core/ExitButton.js"></script>
<script type="text/javascript" src="js/core/ToolbarPanel.js"></script>
<script type="text/javascript" src="js/core/Desktop.js"></script>
<script type="text/javascript" src="js/core/Grid.js"></script>
<script type="text/javascript" src="js/core/Window.js"></script>
<script type="text/javascript" src="js/core/SubWindow.js"></script>
<script type="text/javascript" src="js/core/Module.js"></script>

<script type="text/javascript" src="js/global.js"></script>
<script type="text/javascript" src="js/modules/Setting.js"></script>
<script type="text/javascript" src="js/modules/UserRole.js"></script>
<script type="text/javascript" src="js/modules/UserRole/Role/Add.js"></script>
<script type="text/javascript" src="js/modules/UserRole/Role/Delete.js"></script>
<script type="text/javascript" src="js/modules/UserRole/Role/Permission.js"></script>
<script type="text/javascript" src="js/modules/UserRole/User/Add.js"></script>
<script type="text/javascript" src="js/modules/UserRole/User/Update.js"></script>
<script type="text/javascript" src="js/modules/UserRole/User/Delete.js"></script>
<script type="text/javascript" src="js/modules/UserRole/User/Search.js"></script>

<script type="text/javascript" src="js/modules/Page.js"></script>
<script type="text/javascript" src="js/modules/Page/Add.js"></script>
<script type="text/javascript" src="js/modules/Page/Update.js"></script>
<script type="text/javascript" src="js/modules/Page/Delete.js"></script>
<script type="text/javascript" src="js/modules/Page/Search.js"></script>

<script type="text/javascript" src="js/modules/Language.js"></script>
<script type="text/javascript" src="js/modules/Language/Add.js"></script>
<script type="text/javascript" src="js/modules/Language/Update.js"></script>
<script type="text/javascript" src="js/modules/Language/Delete.js"></script>
<script type="text/javascript" src="js/modules/Language/Code/Add.js"></script>
<script type="text/javascript" src="js/modules/Language/Code/Delete.js"></script>

<!-- loading api -->
<script type="text/javascript" src="api/load"></script>

<script type="text/javascript">
	Ext.BLANK_IMAGE_URL = '../resources/js/ext/ext-{$ext_version}/resources/images/default/s.gif';
	Ext.ns("Ext.App");
	
	Ext.Ajax.on('requestcomplete', function(conn, response, option){
		var text = response.responseText;
		var decode;
		if((decode = Ext.decode(text, false)) && decode.error && decode.msg){
			Ext.Msg.alert('Error', decode.msg);
			Ext.EventObject.stopEvent();	
		}
	});
	Ext.Direct.addProvider(Ext.App.REMOTING_API);
	
	App.Module = {
		setting: new App.module.Setting()
		,userrole: new App.module.Setting.UserRole()
		,page: new App.module.Page()
		,language: new App.module.Language()
	};
	
	
	var app = new App({
		
	});

	app.onReady(function(){
		App.Viewport = new Ext.Viewport({
			layout: 'border'
			,items: [
				App.ToolbarPanel
				,App.Desktop
			]
		});
		
		for(var i in App.Module){
			module = App.Module[i];
			module.app = this;
			module.id = i;
			module.init();
			if(module.launcher){
				var btConf = module.launcher;
				btConf.cls = 'start-menu';
				btConf.iconCls = i + '-16x16';
				App.StartMenu.module.menu.add(btConf);
			}
			
			App.Desktop.addIcon({
				id: module.id
				,name: module.name
				,icon: module.id + '-48x48.png'	
			});
		}	
	});
</script>

</head>
<body>
</body>

</html>